/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Entity;

import KoneksiDatabase.Koneksi;
import com.mysql.jdbc.Statement;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 *
 * @author User
 */
public class LoginAdmin {
    private String nama;
    private String password;

    /**
     * @return the nama
     */
     public LoginAdmin() {
    }

    public LoginAdmin(String nama, String password) {
        this.nama = nama;
        this.password = password;
    }
    public String getNama() {
        return nama;
    }

    /**
     * @param nama the nama to set
     */
    public void setNama(String nama) {
        this.nama = nama;
    }

    /**
     * @return the password
     */
    public String getPassword() {
        return password;
    }

    /**
     * @param password the password to set
     */
    public void setPassword(String password) {
        this.password = password;
    }
     public  boolean getUser() throws SQLException {

        Statement st =  (Statement) Koneksi.getConnection().createStatement();
        ResultSet rs = st.executeQuery("select * from akunmanager");
        while(rs.next()){
            setNama(rs.getString("namaManager"));
            setPassword(rs.getString("passwordManager"));
        }
        return true;
    }
}
